package ro.isdc.training.ejb3.course.service.web;

import java.net.MalformedURLException;
import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;

import ro.isdc.training.ejb3.course.service.CourseService;

/**
 * Course Web Service Client
 * 
 * @author Andrei Chirila
 */
@WebServiceClient(name = "CourseServiceBeanService", 
    targetNamespace = "http://service.course.ejb3.training.isdc.ro/", 
    wsdlLocation = "http://127.0.0.1:8080/advancedejb3-ear-advancedejb3-ejb-0.0.1/CourseServiceBean?wsdl")
public class CourseServiceClient extends Service {

  public CourseServiceClient() throws MalformedURLException {
    super(new URL("http://127.0.0.1:8080/advancedejb3-ear-advancedejb3-ejb-0.0.1/CourseServiceBean?wsdl"), 
        new QName("http://service.course.ejb3.training.isdc.ro/", 
            "CourseServiceBeanService"));
  }

  public CourseServiceClient(URL wsdlLocation, QName serviceName) {
    super(wsdlLocation, serviceName);
  }
  
  @WebEndpoint(name = "CourseServiceBeanPort")
  public CourseService getCourseServicePort() {
    return super.getPort(new QName(
        "http://service.course.ejb3.training.isdc.ro/",
        "CourseServiceBeanPort"), CourseService.class);
  }

}
